package com.jh.complicate.netty.buffer;

import java.nio.ByteBuffer;

/**
 * @author Administrator
 * @projectName newforward
 * @title BufferWrap.java
 * @package com.jh.complicate.netty.buffer
 * @description Buffer包装
 * @date 2019/6/23 18:11
 */
public class BufferWrap {
    public static void main(String[] args) {
        // 初始化
        ByteBuffer buffer = ByteBuffer.allocate(10);

        byte[] array = new byte[10];
        // 包装一个数组成为缓冲区
        ByteBuffer wrapBuffer = ByteBuffer.wrap(array);
    }
}
